﻿using System.Linq;
using Nb.Licenses.Libs.Hardwares;

namespace Nb.Licenses.Libs.MachineCodes
{
    public class MachineCodeService : IMachineCodeService
    {
        public bool ValidateMachineCode(MachineInfo machineInfo, string machineCode)
        {
            throw new System.NotImplementedException();
        }

        public string MakeMachineCode(MachineInfo machineInfo)
        {
            var hardwareSerialNumber = machineInfo.CpuSerialNumbers.OrderBy(x => x.Order).First();
            return hardwareSerialNumber.Number;
        }
    }
}